package com.pickgliss.light2d.display
{
	import flash.utils.getTimer;

	public class LightContainer extends LightImage
	{
		private var _children:Vector.<LightImage>=new Vector.<LightImage>();

		public function LightContainer()
		{
		}

		public function addChild(child:LightImage):LightImage
		{
			_children.push(child);
			return child;
		}
		

		public function removeChild(child:LightImage):LightImage
		{
			return child;
		}

		public function get children():Vector.<LightImage>
		{
			return _children;
		}

		override public function render():void
		{
			super.render();
			var last:int = getTimer();
			for (var i:int=0; i < _children.length; i++)
			{
				_children[i].render();
			}
			trace("all Render time :",String(getTimer()-last));
		}
	}
}
